<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <!-- <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> -->
    <script src="./node_modules/vue/dist/vue.js"></script>
  </head>
  <body>
    <div id="app">
      <div>
        <div v-if="age === 18">"一朵花"</div>
        <div v-else-if="age > 18">"1"</div>
        <div v-else>"2"</div>
      </div>

      <div>
        <div v-if="isShow">if</div>
      </div>

      <div>
        <div v-show="isShow">show</div>
      </div>
    </div>
    <script>
      // v-if vs v-show
      // js -> if else if if else
      //
      // if (age === 18) {
      //   console.log("一朵花");
      // } else if (age > 18) {
      //   console.log("2");
      // } else {
      //   console.log("1");
      // }

      const app = new Vue({
        el: "#app",
        data: {
          msg: "hello world",
          age: 18,
          isShow: true,
        },
      });

      console.log(app);
    </script>
  </body>
</html>
